<template>
  <div class="position">
    <span class="iconfont">&#xe7a3;</span>
    <span class="position__location">北京理工大学国防科技园2号楼10层</span>
    <span class="iconfont">&#xe904;</span>
  </div>
  <Search :placeholder="test" />
  <div class="banner">
    <img
      src="http://www.dell-lee.com/imgs/vue3/banner.jpg"
      alt=""
      class="banner__img"
    />
  </div>
  <div class="nav">
    <ul class="nav__items">
      <li
        class="nav__items__item"
        v-for="item in StaticPartList"
        :key="item.id"
      >
        <img :src="item.imgUrl" alt="" class="nav__items__item__img" />
        <span class="nav__items__item__name">{{ item.name }}</span>
      </li>
    </ul>
  </div>
  <div class="gap"></div>
</template>

<script>
import Search from "../../components/Search";
export default {
  name: "StaticPart",
  components: { Search },
  setup() {
    const StaticPartList = [
      {
        id: 1,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/超市.png",
        name: "超市便利",
      },
      {
        id: 2,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/菜市场.png",
        name: "菜市场",
      },
      {
        id: 3,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/水果店.png",
        name: "水果店",
      },
      {
        id: 4,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/鲜花.png",
        name: "鲜花绿植",
      },
      {
        id: 5,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/医药健康.png",
        name: "医药健康",
      },
      {
        id: 6,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/家居.png",
        name: "家居时尚",
      },
      {
        id: 7,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/蛋糕.png",
        name: "烘培蛋糕",
      },
      {
        id: 8,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/签到.png",
        name: "签到",
      },
      {
        id: 9,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/大牌免运.png",
        name: "大牌免运",
      },
      {
        id: 10,
        imgUrl: "http://www.dell-lee.com/imgs/vue3/红包.png",
        name: "红包套餐",
      },
    ];
    const test = "山姆会员商店优惠商品";
    return { StaticPartList, test };
  },
};
</script>

<style lang="scss" scoped>
@import "../../style/viriables.scss";
@import "../../style/mixins.scss";
.position {
  display: flex;
  margin: 0.16rem 0;
  .iconfont {
    font-size: 0.2rem;
  }
  &__location {
    flex: 1;
    font-size: 0.16rem;
    color: $content-fontcolor;
    line-height: 0.22rem;
    @include ellipse;
  }
}
.banner {
  height: 0;
  margin: 0.12rem 0 0.16rem;
  padding-bottom: 25.4%;
  overflow: hidden;
  &__img {
    width: 100%;
    vertical-align: middle;
  }
}
.nav {
  &__items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    &__item {
      width: 20%;
      margin-bottom: 0.16rem;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      &__img {
        width: 59%;
        margin-bottom: 0.06rem;
      }
      &__name {
        font-size: 0.12rem;
        color: $content-fontcolor;
      }
    }
  }
}
.gap {
  height: 0.1rem;
  margin: 0 -0.18rem;
  background-color: $content-gbcolor;
}
</style>
